#include <stdio.h>

int print_int(int *p, int num)
{
	if(NULL == p)
	{
		printf("输入有误");
		return -1;
	}
	int i = 0;
	int ret = 0;
	for(i = 0; i < num; i++)
	{
		ret += p[i];
	}
	return ret;
}
int main(int argc, const char *argv[])
{
	int arr[] = {1, 2, 3};
	int count = print_int(arr, 3);
	printf("%d\n", count);
	return 0;
}
